﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="myaccount.aspx.cs" Inherits="SysYcjy_myaccount" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
        <link href="../style.css" rel="stylesheet" type="text/css" />
   <style type="text/css">

    </style>
</head>
<body>
    <form id="form1" runat="server">
    	<table border="0" style="padding-top:9px;_margin-top:9px;">
        <tr>
            <td><asp:Label ID="Label1" runat="server" Text=""></asp:Label></td>           
		    <td width="498" align="left"  style="width: 500px" class="font_con ">
                <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
                    DataSourceID="SqlDataSource1" Height="50px" Width="816px" BorderWidth=0px 
                    class="border_det" DataKeyNames="username"  BorderStyle="None" CellPadding="0" 
                    GridLines="Horizontal" OnItemUpdated="DetailsView1_Updated" >
                    <Fields>
                        <asp:BoundField DataField="id" HeaderText="用户编号" InsertVisible="False" ReadOnly="True"
                            SortExpression="id" />
                        <asp:BoundField DataField="username" HeaderText="用户名" SortExpression="username" ReadOnly="True" />
                        <asp:BoundField DataField="mail" HeaderText="电子邮件" SortExpression="mail" ReadOnly="True"/>
                        <asp:TemplateField HeaderText="姓名">
                        <ItemStyle  />
                            <ItemTemplate>
                                <asp:TextBox ID="txtusername1" runat="server" Height="16px" Text='<%# Bind("username1") %>'
                                    Width="100px"></asp:TextBox>
                            </ItemTemplate>
                    </asp:TemplateField>
                        <asp:TemplateField HeaderText="工作单位">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgzdw" runat="server" Height="16px" Text='<%# Bind("gzdw") %>'
                                    Width="100px" MaxLength="50"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="jigou" HeaderText="所属机构" SortExpression="jigou" ReadOnly="True" />
                        <asp:TemplateField HeaderText="所在城市">
                            <ItemTemplate>
                                <asp:TextBox ID="txtcity" runat="server" Height="16px" Text='<%# Bind("city") %>'
                                    Width="100px" MaxLength="40"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="手机">
                            <ItemTemplate>
                                <asp:TextBox ID="txtmobile" runat="server" Height="16px" Text='<%# Bind("mobile") %>'
                                    Width="100px" MaxLength="20"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="chuzhi" HeaderText="储值金额" SortExpression="chuzhi" ReadOnly="True" />
                        <asp:BoundField DataField="xtsj1" HeaderText="注册时间" SortExpression="chuzhi" ReadOnly="True" />
                        <asp:TemplateField HeaderText="备用邮件">
                            <ItemTemplate>
                                <asp:TextBox ID="txtemail" runat="server" Height="16px" Text='<%# Bind("email") %>'
                                    Width="100px" MaxLength="100"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="个人简介">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgrjj" runat="server" Height="127px" Text='<%# Bind("grjj") %>'
                                    TextMode="MultiLine" Width="600px"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" />
                    </Fields>
                    <FooterStyle />
                    <RowStyle />
                    <PagerStyle  CssClass="border_none" />
                    <HeaderStyle  />
                    <EditRowStyle />
                    <AlternatingRowStyle  />
          </asp:DetailsView>
          </td>
        </tr>
</table>
    <br />
    <table>
        <tr>
            <td style="width: 100px" >
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:xxptConnectionString %>"
                    SelectCommand="SELECT [id], [username], [mail], [username1], [gzdw], [jigou], [grjj], [mobile],[city], [chuzhi], [email],[xtsj1],[xtsj2] FROM [account] WHERE ([username] = @username)"
                    
                    UpdateCommand="UPDATE account SET mail = mail WHERE [username] = @username"
                    onupdating="SqlDataSource1_Updating">
                    <SelectParameters>
                        <asp:SessionParameter Name="username" SessionField="sUserName" Type="String" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="username" Type="String" />
                        <%--<asp:Parameter Name="username1" Type="String"  />
                        <asp:Parameter Name="mail" Type="String" />
                        <asp:Parameter Name="gzdw" Type="String" />
                        <asp:Parameter Name="mobile" Type="String" />
                        <asp:Parameter Name="email" Type="String" />
                        <asp:Parameter Name="grjj" Type="String" />
                        <asp:Parameter Name="city" Type="String" />--%>
                    </UpdateParameters>
                </asp:SqlDataSource>
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
        </tr>
    </table>
</form>
</body>
</html>
